<template>
  <div>
    <input type="text" ref="ipt" v-if="showInput">
    <button @click="show" ref="btn" v-else>切换样式</button>
  </div>
</template>

<script>
export default {
  name: 'MyCounter',
  data() {
    return {
      count: 1,
      showInput: false
    }
  },
  methods: {
    show() {
      this.showInput = true
    }
  }
}
</script>

<style>

</style>